import com.intellij.openapi.actionSystem.AnAction;
import com.intellij.openapi.actionSystem.AnActionEvent;
import com.intellij.openapi.actionSystem.CommonDataKeys;
import com.intellij.openapi.ui.Messages;

/**
 * Created by jiao on 16/4/21.
 */
public class ToolbarAction extends AnAction {

    @Override
    public void actionPerformed(AnActionEvent e) {
//        Application application = ApplicationManager.getApplication();
//        MGComponent component = application.getComponent(MGComponent.class);
//        component.speak();

        Messages.showMessageDialog("调用了", "标题", Messages.getInformationIcon());

//        Object navigatable = e.getData(CommonDataKeys.NAVIGATABLE);
//        if (navigatable != null) {
//            Messages.showDialog(navigatable.toString(), "Selected Element:", new String[]{"OK"}, -1, null);
//        }

    }
}
